Scripting > CxEditors > CxElsEditor Object > CxElsEditor Methods

CxElsEditor Methods

The CxElsEditor object contains the following methods:

Configure

The Configure method launches an ELS Definitions dialog box, which is used to configure event attributes.

Syntax

Configure() As Integer

Remarks

This method returns a 1 if successful; otherwise it returns a 0.

Example

The following example launches an ELS Definitions dialog box.

Sub

Dim iRet

iRet= ElsEditor.Configure

MsgBox iRet

End Sub

Back to top

Connect

The Connect method connects to a ELS.

Syntax

Connect(DomainSiteService As String)

Parameters

Parameter Required Description

DomainSiteService

Yes

The [Domain]Site.Service to which to connect.  A domain is optional. The service must be a valid ELS.

Example

The following example creates and connects the CxElsEditor object.

Sub

Dim ElsEditor

Set ElsEditor = CreateObject("CxEditors.CxElsEditor")

ElsEditor.Connect("[5410]CYGDEMO.ELS")

End Sub

Back to top

Copy

The Copy method launches a New Event property sheet initialized with the information in the specified record.

Syntax

Copy(QueueKey As String) As Integer

Parameters

Parameter Required Description

QueueKey

Yes

The database queue key of the record to copy.

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
 

1

OK button was pressed.
  2 Cancel button was pressed.

Example

The following example launches a New Event property sheet for record "0000108387."

Sub

Dim iRet

iRet= ElsEditor.Copy("0000108387")

MsgBox iRet

End Sub

Back to top

Delete

The Delete method launches a Delete Event property sheet initialized with the information in the specified record.

Syntax

Delete(QueueKey As String) As Integer

Parameters

Parameter Required Description

QueueKey

Yes

The database queue key of the record to delete.

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
 

1

OK button was pressed.
  2 Cancel button was pressed.

Example

The following example launches a Delete Event property sheet for record "0000108387."

Sub

Dim iRet

iRet= ElsEditor.Delete("0000108387")

MsgBox iRet

End Sub

Back to top

Disconnect

The Disconnect method disconnects from the connected ELS service.

Syntax

Disconnect()

Example

The following example disconnects the ElsEditor object.

Sub

ElsEditor.Disconnect

End Sub

Back to top

Edit

The Edit method launches a property sheet for the specified record.

Syntax

Edit(QueueKey As String) As Integer

Parameters

Parameter Required Description

QueueKey

Yes

The database queue key of the record to edit.

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
 

1

OK button was pressed.
  2 Cancel button was pressed.

Example

The following example launches a property sheet for record "0000108387."

Sub

Dim iRet

iRet= ElsEditor.Edit("0000108387")

MsgBox iRet

End Sub

Back to top

New

The New method launches a New Event property sheet.

Syntax

New() As Integer

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
 

1

OK button was pressed.
  2 Cancel button was pressed.

Example

The following example launches a New Event property sheet.

Sub

Dim iRet

iRet= ElsEditor.New

MsgBox iRet

End Sub

Back to top

View

The View method launches a property sheet for the specified record.

Syntax

View(Key As String, EditEnabled As Boolean) As Integer

Parameters

Parameter Required Description

Key

Yes

The database queue key of the record to view.

EditEnabled

Yes

Set to true to enable editing of the property sheet.

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
  2 Cancel button was pressed.

Example

The following example launches a property sheet for record "0000108387."

Sub

Dim iRet

iRet= ElsEditor.View("0000108387", True)

MsgBox iRet

End Sub

Back to top

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.